<template>
    <el-table :data="logData" border style="width: 100%">
        <el-table-column prop="username" label="登入账户" width="180"> </el-table-column>
        <el-table-column prop="lastLogin.ip" label="上次登入ip" width="180"></el-table-column>
        <el-table-column prop="lastLogin.loginTime" label="上次登入时间" width="180"></el-table-column>
        <el-table-column prop="nowLogin.ip" label="本次登入ip" width="180"></el-table-column>
        <el-table-column prop="nowLogin.loginTime" label="本次登入时间"></el-table-column>
    </el-table>
</template>


<script setup>
import { onBeforeMount,ref } from 'vue';
import * as api from "../../../api/users"
// 获取登入日志、


let logData =ref([])
onBeforeMount ( async()=>{
  try {
    let res = await api.getloginlog()
    // console.log(res.data.data, '11111')
    logData.value=res.data.data
} catch (error) {
    console.log(error);
    
}  
}) 

</script>
<script >
export default{
    meta:
     { 
        title: 'glsy', 
        name: '管理首页',
        routeName:"welcome",
        icon:'icon-chanpin5'
    }
}

</script>